package com.my.controller;


import com.my.bean.User;
import com.my.service.UserService;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 张子艺
 * @since 2018-08-18
 */
@Controller
@RequestMapping("/user")
public class UserController {
    @Resource
    UserService userService;
    @RequestMapping("/index")
    public  String index(){
        User user=new User();
        user.setName("你");
        userService.insert(user);
        return "index";
    }
}
